package com.box.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.http.HttpResponse;

import com.box.entity.DbUsers;
import com.box.entity.UserSearch;
import com.box.utils.LayuiResult;
import com.box.utils.ResponseResult;




public interface UserService {
	
	//获取用户信息
	public LayuiResult selUsers(Integer page, Integer limit,UserSearch search);
	
	//检验昵称是否一致
	public DbUsers checkUserByNickname(String nickname,Long uid) throws Exception;

	//检验邮箱是否可用
	public DbUsers checkUserByEmail(String email,Long uid) throws Exception;
	
	//添加用户
	public Integer insertUserBySerliaze(DbUsers users) throws Exception;
	
	//检测用户名是否可用
	public DbUsers checkUserByUserName(String username,Long uid) throws Exception;
	
	//获取用户列表
	public List<DbUsers> getUserList();
	
	//根据id删除用户记录
	public Integer delUserById(String uid);
	
	//根据id查询用户
	public DbUsers selUserById(Long uid);
	
	//更新用户信息
	public Integer updUserService(DbUsers users);
	
	//批量删除用户
	public Integer delUsersService(String userStr);
	
	//用户登录
	public LayuiResult selUsersByUserNameAndPassword(String userName,String passWord);
	
	//用户注册
	public LayuiResult insertUsersBySelectTive(String userName,String passWord,String phone,String email) throws Exception;
	//查询用户手机号
	public DbUsers checkUsersByPhone(String phone,Long uid) throws Exception;
	//通过session中的用户名进行查询相关信息
	public DbUsers selUsersByUserName();
	//修改用户信息
	public Integer updateByUsers(DbUsers users);
	//修改用户信息和修改密码
	public ResponseResult updateUser(String userName,String nicknamem,String passWord,Long telphone) throws Exception;
	//添加cookie
	public void addCookie(HttpServletRequest request,HttpServletResponse response,String userName,String passWord) throws Exception;
}
